package com.iespring.controller.app.comment;

import com.fasterxml.jackson.databind.ser.Serializers;
import com.iespring.bean.app.comment.bo.CommentPostBo;
import com.iespring.bean.common.BasePageInfo;
import com.iespring.bean.common.BaseRespVo;
import com.iespring.service.app.comment.WxCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author:ZhangShuPeng
 * @Date:2023/01/02/13:51
 * @Description:
 */
@RestController
@RequestMapping("wx/comment")
public class WxCommentController {

    @Autowired
    WxCommentService wxCommentService;

    @RequestMapping("list")
    public BaseRespVo list(int limit, int page, int valueId, Byte type, int showType) {

        BaseRespVo baseRespVo = wxCommentService.list(limit, page, valueId, type, showType);
        return baseRespVo;

    }

    @RequestMapping("count")
    public BaseRespVo count(int valueId, byte type) {

        BaseRespVo baseRespVo = wxCommentService.count(valueId, type);
        return baseRespVo;

    }

    @RequestMapping("post")
    public BaseRespVo post(@RequestBody CommentPostBo commentPostBo) {

        BaseRespVo baseRespVo = wxCommentService.post(commentPostBo);
        return baseRespVo;

    }


}
